package model

import (
	"go-mall/global"
	"time"
)

// User 用户表
type User struct {
	global.MODEL
	UserName string    `json:"username" form:"username" gorm:"column:username;comment:管理员登陆名称;type:varchar(50);"`
	Password string    `json:"password" form:"password" gorm:"column:password;comment:管理员登陆密码;type:varchar(1000);"`
	NickName string    `json:"nickname" form:"nickname" gorm:"column:nickname;comment:管理员显示昵称;type:varchar(50);"`
	RealName string    `json:"realName" form:"realName" gorm:"column:real_name;comment:真实姓名;type:varchar(50);"`
	ImgUrl   string    `json:"imgUrl" form:"imgUrl" gorm:"column:img_url;comment:头像图片地址;type:varchar(500);"`
	Email    string    `json:"email" form:"email" gorm:"column:email;comment:邮箱;type:varchar(50);"`
	Mobile   string    `json:"mobile" form:"mobile" gorm:"column:mobile;comment:手机号; type:varchar(50);"`
	Sex      uint      `json:"sex" form:"sex" gorm:"column:sex;comment:性别(0-男 1-女 2-其他);type:bigint;"`
	Birthday time.Time `json:"birthday"  form:"birthday" gorm:"column:birthday;comment:生日;type:datetime"`
	Sign     string    `json:"sign" form:"sign" gorm:"column:sign;comment:签名;type:varchar(50);"`
	Locked   int       `json:"locked" form:"locked" gorm:"column:locked;comment:是否锁定 0未锁定 1已锁定无法登陆;type:tinyint;"`
	IsLogout int       `json:"isLogout" form:"isLogout" gorm:"column:is_logout;comment:注销标识字段(0-正常 1-已注销);type:tinyint;"`
}
